import React,{Component} from 'react'
import {Route,NavLink} from 'react-router-dom'
import Home from './components/home';
import Ticket from './components/ticket';
import ShopMall from './components/shopMall';
import Discover from './components/discover';
import Mine from './components/mine';
import AppStyle from './App.module.css'

class App extends Component {
    render(){
        return (
          <div>
              <Route path='/' component={Home} exact>首页</Route>
              <Route path='/ticket' component={Ticket}>购票</Route>
              <Route path='/shopmall' component={ShopMall}>商城</Route>
              <Route path='/discover' component={Discover}>发现</Route>
              <Route path='/mine' component={Mine}>我的</Route>
              <nav className={AppStyle.nav}>
                  <NavLink to='/' exact>首页</NavLink>
                  <NavLink to='/ticket'>购票</NavLink>
                  <NavLink to='/shopmall'>商城</NavLink>
                  <NavLink to='/discover'>发现</NavLink>
                  <NavLink to='/mine'>我的</NavLink>
              </nav>
          </div>
          
        )
    }
}

export default App